import {createApp} from 'vue'
import App from './App.vue'
import './assets/global.css'
import "element-plus/dist/index.css"
import router from './router'
import ElementPlus from 'element-plus'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import axios from './utils/axios'
import message from './utils/message'
import store from './store'
import mavonEditor from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'
import MardownIt from 'markdown-it/lib/index'
import mitt from 'mitt'


const app = createApp(App)


app.config.globalProperties.$EventBus = new mitt()
app.config.globalProperties.$axios = axios;
app.config.globalProperties.message = message;
app.config.globalProperties.markdown = new MardownIt();

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

app.use(store).use(router).use(mavonEditor).use(ElementPlus).mount('#app')